package com.tg.service.base.createbean;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class A implements InitializingBean {

    private static final Logger LOGGER = LoggerFactory.getLogger(A.class);

    @Autowired
    private B b;

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public A() {
        LOGGER.info("construct:A");
    }

    public void invoke() {
        LOGGER.info("invoke:A");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        LOGGER.info("init:A");
    }
}
